package ch3.ex4;

import static ch3.print.Print.*;
public class Primes {
	public static void main(String[] args){
		int count = 0;
		for(int i = 0; i < 1000; i++){
			int factors = 0;
			for(int j = 1; j < (i + 2)/2; j++){
				if((i % j) == 0) factors++;
			}
			if(factors < 2) count++;
		}
		println(count + " primes from 100.000 numbers.");
	}
}
